﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Text;

namespace RnD
{
    class Program
    {
        static void Main(string[] args)
        {
            var message = new System.Net.Mail.MailMessage();
            message.To.Add("me@nadeemlari.com");
            message.Subject = "This is the Subject line";
            message.From = new System.Net.Mail.MailAddress("info@larisoft.in");
            message.Body = "This is the message body";
            var smtp = new System.Net.Mail.SmtpClient("smtp.larisoft.in");
            smtp.UseDefaultCredentials = false;
            smtp.Credentials = new NetworkCredential("info@larisoft.in", "ilove786");
            //smtp.Credentials = new NetworkCredential();
            smtp.EnableSsl = true;
            smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
            smtp.Port = 25;
            smtp.Send(message);
            Console.WriteLine("Done!--");
        }
    }
}
